﻿{layout:simple}{class:Shop.supplier.product.Ask_Edit_window}
<lbbody>
<table cellspacing="0" border="0" style="width: 100%; border-collapse: collapse;" id="common" class="table">
    <tr>
        <th style="width: 15%;">
            <%=Tag("商品名称")%>：
        </th>
        <td colspan="3" style="width: 85%;">
        <% if (GetProduct(model.Keyid).ImageSmall != "")
            { %>
        <img style="height: 30px;width: 30px;vertical-align:middle" src="<%=Image(GetProduct(model.Keyid).ImageOriginal,50,50) %>" />
        <%} %>
        <%=Lang(GetProduct(model.Keyid).Name)%>
        </td>
    </tr>
    <tr>
        <th style="width: 15%;">
            <%=Tag("会员账号")%>：
        </th>
        <td style="width: 35%;">
            <%=model.User_UserName%>
        </td>
        <th style="width: 15%;">
            <%=Tag("状态")%>：
        </th>
        <td style="width: 35%;">
        <%=Shop.Bussiness.EX_Type.TypeName(model.Status, CurrentLanguage)%>
        </td>
    </tr>
    <tr>
        <th >
            <%=Tag("语言")%>：
        </th>
        <td>
            <%=model.Language_Code%>
        </td>
        <th >
            <%=Tag("时间")%>：
        </th>
        <td>
            <%=FormatTime(model.Time_Add)%>
        </td>
    </tr>
    <tr>
        <th style="vertical-align:top">
            <%=Tag("内容")%>：
        </th>
        <td colspan="3">
            <%=model.Content.Replace("\r\n", "<br/>")%>
        </td>
    </tr>
    </table>
    <%if (model.Parentid == 0)
      { %>
    <ul id="tablistmain"><li class="selected"><a><span><%=Tag("回复")%></span></a></li></ul>
    <table cellspacing="0" border="0" style="width: 100%; border-collapse: collapse;" id="Table1" class="table">
    <tr>
        <th style="width: 15%;" valign="top">
            <%=Tag("内容")%>：
        </th>
        <td>
            <textarea class="textarea" style="width:400px;height:60px;" id="Content" min="notnull" name="Content" shop="true"></textarea>
            <div class="tools clear">
                <ul>
                    <li class="plus"><a href="javascript:void(0);" onclick="javascript:resizeEditor('Content',100);"><b></b><span><%=Tag("展开")%></span></a></li>
                    <li class="minus"><a href="javascript:void(0);" onclick="javascript:resizeEditor('Content',-100)"><b></b><span><%=Tag("收缩")%></span></a></li>
                </ul>
            </div>
        </td>
    </tr>
    <tr>
        <td colspan="2" class="action">
        <div class="tools tools-m clear">
            <ul>
                <li class="submit"><a href="javascript:void(0);" onclick="SaveObj();"><b></b><span><%=Tag("保存")%></span></a></li>
            </ul>
        </div>
        </td>
    </tr>
    </table>
    <table cellspacing="0" border="0" style="width: 100%; border-collapse: collapse;" id="Table2" class="table">
    <%foreach (Shop.Model.Lebi_Comment modellist in models)
      {%>
    <tr id="content<%=modellist.id %>" class="list">
        <th style="width: 25%;" valign="top">
            <%=modellist.Time_Add%>：
        </th>
        <td>
            <%=modellist.Content.Replace("\r\n", "<br/>")%>
        </td>
        <td style="width: 50px;" valign="top">
            <a href="javascript:void(0);" onclick="delitem(<%=modellist.id %>)"><%=Tag("删除") %></a>
        </td>
    </tr>
    <%} %>
    </table>
    <script type="text/javascript">
        function SaveObj() {
            var postData = GetFormJsonData("shop");
            if (!CheckForm("shop", "span"))
                return false;
            var url = "<%=site.AdminPath %>/ajax/ajax_product.aspx?__Action=Ask_Edit&id=<%=model.id %>";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        function delitem(id) {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = "";
            var url = "<%=site.AdminPath %>/ajax/ajax_product.aspx?__Action=Ask_Del&Delid="+ id;
            RequestAjax(url,postData,function(){$('#div_error').dialog('close');$("#content"+ id).remove();});
        }
    </script>
<%} %>
</lbbody>